The present invention relates to a MPEG (Moving Picture Experts Group) data processing circuit and a method of controlling the MPEG data processing circuit which carries out data processing, for example, electronic watermarking into MPEG video data, on a MPEG coded system stream, such as TS (Transport Stream), PS (Program Stream), and the like, and restores the system stream to the original state to be outputted from the MPEG data processing circuit.
MPEG standard (MPEG 1 and MPEG 2) has been proposed as a standard for use in compressing a moving picture video image and a voice signal for transmission or storage. The compressed MPEG data stream includes various parameters required for restruction of voice data and video data. The MPEG data stream can be readily divided into two data streams, namely, a voice data stream and a video data stream.
In relation to MPEG technique, required is a function (processing) by which data processing is carried out for partially tampering with data of the MPEG coded system stream, such as TS (Transport Stream), PS (Program Stream), and the like, and by which the system stream is restored to the original state and is outputted from a circuit.
As a well-known example, an insertion processing of electronic watermark is used for the purpose of protecting copy right of data, and the like. The electronic watermark is such a technique that video data are intentionally altered to an invisible extent to have an extremely few differences, so that certain information is buried into the video data. Hereunder, description is made about data processing for partially tampering with MPEG data with respect to an example of inserting electronic watermark into video data.
Conventionally, various methods or techniques have been proposed for the insertion processing of electronic watermark into video data. In one of the methods or techniques, electronic watermark is buried into an image in the state of NTSC or PAL type video signal to be MPEG encoded. On the other hand, in another one of the methods or techniques, electronic watermark is buried into MPEG encoded VES (Video Elementary Stream), and the electronic watermarked VES is thereafter rendered to MPEG system stream (TS/PS)
However, in the method that electronic watermark is buried into an image in the state of the video signal, it is necessary for MPEG encoded stream to be once decoded into video signal for the insertion processing of electronic watermark, and to be thereafter MPEG encoded again. On the other hand, in the method that electronic watermark is buried into MPEG encoded VES, all streams are once divided into video data portions and non-video data portions to be stored in large scale memory medium (for example, a hard disk, etc.). Electronic watermark is then buried into the VES. The electronic watermarked VES is stored in the large scale memory medium. Thereafter, the electronic watermarked VES and the previously stored non-video data portions are read from the large scale memory medium, so that the electronic watermarked VES and the non-video data portions are combined with each other.
An example of the technique for inserting electronic watermark into the VES is disclosed in unexamined Japanese Patent Publication 2000-244881 with a title “Electronic watermarking data insertion system”. In the unexamined Japanese Patent Publication 2000-244881, when DCT (Discrete Cosine Transform) factor following to ESCAPE code in MPEG data is detected, a position of the DCT factor and information required for inserting the electronic watermarking data are extracted. Based on the position and the information, the DCT factor is converted into another DCT factor that the electronic watermarking data are inserted. Accordingly, output MPEG data are thereby produced.
However, some problems are caused to occur in the methods or techniques mentioned above Namely, it takes more than two processes to carry out operations of any one of the methods or techniques. Accordingly, it is not possible to carry out the operations at real time. Further, a large scale memory is required therefor.
Another example of the methods or techniques is also disclosed in unexamined Japanese Patent Publication Hei 11-341450, namely 1999-341450, with a title “Electronic watermark burying apparatus and electronic watermark extracting apparatus”. In the unexamined Japanese Patent Publication Hei 11-341450, an electronic watermark burying apparatus capable of burying electronic watermark without decoding TS (Transport Stream) is proposed together with an electronic watermark extracting apparatus. In the electronic watermark burying apparatus, a predetermined starting or ending code of 32 bits is detected from MPEG 2 data encoded into TS. An electronic watermark is then buried in a certain position counted from the position of the 32-bit code.
In the technique disclosed in the unexamined Japanese Patent Publication Hei 11-341450, a great deal of memories must be owned, responsive to MPEG stream that PESH or TSH exists in a DCT factor of a block layer of encoded image information. According to specifications of MPEG, length of a DCT factor cannot be recognized, unless all of bits constituting the DCT factor are prepared. As a result, factors following thereto cannot be continuously decoded. Accordingly, it is necessary to prepare all of the bits constituting the DCT factor. When PESH or TSH exists in a DCT factor, a header thereof must be temporarily stored. If the header is not stored, all of the bits constituting the DCT factor cannot be prepared Therefore, as mentioned above, a great deal of memories must be prepared, responsive to the MPEG stream that PESH or TSH exists in the DCT factor. Consequently, in the technique disclosed in the unexamined Japanese Patent Publication Hei 11-341450, a circuit required therefor inevitably becomes large in scale.